package com.dg11185.nearshop.net.request;

import com.dg11185.libs.network.http.client.HttpRequest;
import com.dg11185.libs.utils.MD5.MD5Utils;
import com.dg11185.nearshop.app.Constants;
import com.dg11185.nearshop.net.response.GetMerchantStatsResponse;

public class GetMerchantStatsRequest extends HttpRequest<GetMerchantStatsResponse>{

    public GetMerchantStatsRequest(String merchantId) {
        super(Constants.ADDRESS, Constants.getMerchantStats);
        addParam("merchantId", merchantId);
        addParam("chshToken", Constants.TOKEN);
        addParam("chshSign", MD5Utils.getMD5Str(getParams(), Constants.MD5_key));
    }

    @Override
    protected GetMerchantStatsResponse parseJson(String response) throws Exception {
        
        GetMerchantStatsResponse r = new GetMerchantStatsResponse();
        r.parseJson(response);
        return r;
    }

}
